/**
 * @description Count string length
 * @param name 
 * @returns 
 */
export function foo(name: string) {
  const separator = ','
  return name.split(separator)
}


foo('Lionel')






// 泛型
// function bar<T>(arg: T): T {
//   return arg
// }


// 类型定义在哪
export type fooItem = string | number | null

function baz(arg: fooItem): void {
  console.log(arg);

}


export interface useRes {
  nickname: string,
  avatar?: string,      //可选属性
  age: number
}

